package com.juphoon.oauth.oauth;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationManager;
import org.springframework.security.config.BeanIds;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

/**
 * @author rongbin.huang
 * @create 2018-06-27 下午10:25
 **/
@Configuration
public class AuthenticationMangerConfig extends WebSecurityConfigurerAdapter {


    /**
     * 新版需复写该方法，不然无法启动
     * @return
     * @throws Exception
     */
    @Bean(name = BeanIds.AUTHENTICATION_MANAGER)
    @Override
    public AuthenticationManager authenticationManagerBean() throws Exception {
        return super.authenticationManagerBean();
    }

}
